<?php
include 'mysql.php';
$list = array() ;
$result = $mysqli->query("select * from message");
while($row =$result->fetch_array() ){
    $list[] = $row;
}

?>
<!doctype html>
<html>
<head>
<title>后台管理</title>
<meta charset="UTF-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<link href="css/admin_full.css" rel="stylesheet" />
<script src="js/jquery.js"></script>
</head>
<body>
<div id="popup"></div>
<div class="wrap J_check_wrap">
    <div class="h_a">功能说明</div>
    <div class="prompt_text">
       管理网友留言
    </div>

    <div class="h_a">留言列表</div>
    <div class="table_list" id="DataBox">
            <table width="100%">
                <thead>
                <tr>
                    <td>留言ID</td>
                    <td>用户id</td>
                    <td>用户昵称</td>
                    <td>姓名</td>
                    <td>手机</td>
                    <td>邮箱</td>
                    <td>内容</td>
                    <td>编辑</td>
                  </tr>
                </thead>
                <?php if(!empty($list)&&isset($list)):?>
                    <?php foreach($list as $val):?>
                        <tr>
                        <td> <?php echo @$val['id'];?></td>
                        <td> <?php echo @$val['uid'];?></td>
                        <td> <?php echo @$val['nick'];?></td>
                        <td> <?php echo @$val['name'];?></td>
                        <td> <?php echo @$val['mobile'];?></td>
                        <td> <?php echo @$val['mail'];?></td>
                        <td  width="300"> <?php echo @$val['content'];?></td>
                        <td> <a href="action.php?action=delete_message&id=<?php echo $val['id'];?>">删除</a></td>
                        </tr>
                    <?php endforeach;?>
                <?php endif;?>

             </table>
    </div>

</div>
</body>
</html>

<?php $mysqli->close(); ?>